﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 访问者模式
{
    class Employee:Element
    {
        string name;
        double income;
        int vacatonDays;

        public Employee(string name,double income, int vacatonDays)
        {
            this.name = name;
            this.income = income;
            this.vacatonDays = vacatonDays;
        }

        // 属性
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public double Income
        {
            get { return income; }
            set { income = value; }
        }

        public int VacationDays
        {
            get { return vacatonDays; }
            set { vacatonDays = value; }
        }

        public override void Accept(IVisitor visitor)
        {
            visitor.Visit(this);
        }
    }
}
